<?php
$res = select($config,'category');
// var_dump($res);
?>
<div id="sidebar">	
	<div id="sidebar-color"></div>		<!-- SIDEBAR COLOR LAYER -->
	<div id="sidebar-border"></div>		<!-- SIDEBAR BORDER LAYER -->
	<div id="sidebar-light"></div>		<!-- SIDEBAR RADIAL GRADIENT LIGHT LAYER -->
	<div id="sidebar-texture"></div>	<!-- SIDEBAR TEXTURE LAYER -->
	
	<!-- SIDEBAR CONTENT LAYER -->
	<div id="sidebar-content">	
	
		<!-- LOGO -->
		<div id="logo">
			<a href="index.html"><img src="/public/images/logo.png" alt="" /></a>
		</div>
			
		<!-- MENU -->
		<ul id="menu">
			<li class="current"><a href="/home/index.php">首页</a></li>
			<li>栏目
				<ul>
					<?php
                        foreach($res as $k=>$v){
                            echo '<li><a href="./articlelist.php?cid='.$v['id'].'&title='.$v['title'].'">'.$v['title'].'</a></li>';
                        }
                    ?>
				</ul>
			</li>
			<li>个人中心
				<ul>
					<li><a href="./login.php">登录</a></li>
					<li><a href="./register.php">注册</a></li>
					<li><a href="./logout.php">注销</a></li>
				</ul>
			</li>
			
		</ul>
				
	</div><!-- #sidebar-content ends -->	

	<!-- SOCIAL ICONS ON SIDEBAR'S BOTTOM PART -->
	<ul id="sidebar-bottom">			
		<li><a href="#"><img src="/public/images/sidebar_icons/facebook.png" alt="" /></a></li>
		<li><a href="#"><img src="/public/images/sidebar_icons/twitter.png" alt="" /></a></li>
		<li><a href="#"><img src="/public/images/sidebar_icons/rss.png" alt="" /></a></li>
	</ul>
</div><!-- #sidebar ends -->	